﻿<!DOCTYPE HTML>
<html lang="zh-CN" ng-app="app">
<head>
    <meta charset="UTF-8">
    <title>重邮树洞网</title>
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css" />
    <!-- 原切换页面动画
    <link rel="stylesheet" type="text/css" href="/css/me-pageloading.min.css" />
    -->
    <link rel="stylesheet" type="text/css" href="/css/editor.css" />
    <link rel="stylesheet" type="text/css" href="/css/index.css" />
    <base href="/">
</head>
<body>
    <nav class="navbar navbar-default" ng-controller="indexCtrl">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="welcome">
                    <span class="glyphicon glyphicon-tree-deciduous"></span>
                </a>
            </div>

            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li><a href="/">首页</a></li>
                    <li><a href="hot">发现</a></li>
                    <li><a href="say">发表</a></li>
                </ul>

                <ul ng-if="!name" class="nav navbar-nav navbar-right">
                    <li><a href="login">登录</a></li>
                    <li><a href="regist">注册</a></li>
                </ul>
                <ul ng-if="name" class="nav navbar-nav navbar-right">
                    <li><a href="{{name}}"><span ng-bind="name"></span></a></li>
                    <li><a href="javascript:;" ng-click="logout()">退出</a></li>
                </ul>

                <!-- 搜索框 -->
                <div class="search navbar-right">
                    <input type="text" class="form-control" placeholder="搜索人、秘密" ng-model="keyword" ng-change="search()" ng-blur="hideResultBox()" ng-click="showResultBox()">
                    <span class="glyphicon glyphicon-search search-button"></span>
                    <div id="search-result-box" ng-if="resultBoxShow">
                        <div class="up-arrow"></div>

                        <ul class="search-result-list">
                            <h5 ng-if="!usersSearched">未找到与'<span ng-bind="keyword"></span>'相关的用户</h5>
                            <h5 ng-if="usersSearched">查找到的相关用户：</h5>
                            <li ng-repeat="user in usersSearched" class="search-result-item">
                                <a href="{{user.name}}" ng-bind="user.name"></a>
                            </li>
                            <h5 ng-if="postsSearched">查找到的相关内容：</h5>
                            <h5 ng-if="!postsSearched">未找到与'<span ng-bind="keyword"></span>'相关的秘密</h5>
                            <li ng-repeat="post in postsSearched" class="search-result-item">
                                <a href="/post/{{ post._id }}" ng-bind="post.content"></a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div><!-- /.navbar-collapse -->

        </div>

        <ul id="top-message">
            <li ng-repeat="message in messages">
                <span ng-if="message.code" class="label label-success" ng-bind="message.msg"></span>
                <span ng-if="!message.code" class="label label-danger" ng-bind="message.msg"></span>
            </li>
        </ul>
    </nav>

    <div id="main" class="view-container">
        <!-- 路由区域 -->
        <ng-view class="view-frame" />
    </div>

    <!-- javascripts -->

    <script type="text/javascript" src="js/utils/jquery.min.js"></script>
    <script type="text/javascript" src="js/utils/bootstrap.min.js"></script>
    <script type="text/javascript" src="js/utils/marked.js"></script>
    <script type="text/javascript" src="js/utils/editor.js"></script>
    <script type="text/javascript" src="js/angular/angular/angular.min.js"></script>
    <script type="text/javascript" src="js/angular/angular-animate.min.js"></script>
    <script type="text/javascript" src="js/angular/angular-route/angular-route.min.js"></script>
    <script type="text/javascript" src="js/angular/angular-cookies/angular-cookies.min.js"></script>
    <script type="text/javascript" src="js/angular/angular-ui.min.js"></script>
    <!-- 原切换页面动画
    <script type="text/javascript" src="js/snap.svg-min.js"></script>
    <script type="text/javascript" src="js/me-pageloading.min.js"></script>
    -->
    <script type="text/javascript" src="js/angular/angular-file-upload-shim.js"></script>
    <script type="text/javascript" src="js/angular/angular-file-upload.js" ></script>
    <script type="text/javascript" src="js/angular/angular-sanitize.js"></script>

    <script type="text/javascript" src="js/index.js" ></script>
    <script type="text/javascript" src="js/services.js"></script>
    <script type="text/javascript" src="js/controllers.js"></script>
    <script type="text/javascript" src="js/directives.js"></script>
    <script type="text/javascript" src="js/filters.js"></script>
</body>
</html>
